﻿namespace LearnDI
{

    public interface IDI
    { }

    public interface IClass: IDI
    {
        void Print();
    }

    public interface IClassX
    { }

    public interface IClassY: IDI
    { }

    public class BaseClass : IDI
    {
    }

    public class AClass : BaseClass, IClass, IClassY
    {
        public virtual void Print()
        {
            Console.WriteLine("AClass");
        }
    }

    public class BClass : AClass, IClassX
    {
        public override void Print()
        {
            Console.WriteLine("BClass");
        }
    }

}
